package logger

import (
	"time"

	"github.com/phuslu/fasttime"
)

func TimeFormatNow(format string, now time.Time) string {
	return fasttime.Strftime(format, now)
}

func TimeFormatNowToBuffer(dst []byte, format string, now time.Time) int {
	r := fasttime.AppendStrftime(dst[:0], format, now)
	return len(r)
}
